import { Spin } from 'antd'
import { FC } from 'react'

interface LoadingSpinnerProps {
  is3D?: boolean
}

const LoadingSpinner: FC<LoadingSpinnerProps> = ({ is3D = false }) => {
  if (is3D) {
    return (
      <mesh>
        <sphereGeometry args={[0.5, 32, 32]} />
        <meshStandardMaterial color="#1890ff" />
      </mesh>
    )
  }

  return (
    <div style={{ 
      width: '100%', 
      height: '100%', 
      display: 'flex', 
      justifyContent: 'center', 
      alignItems: 'center',
      minHeight: '200px'
    }}>
      <div style={{ padding: '20px' }}>
        <Spin size="large">
          <div style={{ padding: '50px', textAlign: 'center' }}>
            Loading...
          </div>
        </Spin>
      </div>
    </div>
  )
}

export default LoadingSpinner